package com.asset.troubleticket.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="tt_ticket_history")
public class TicketHistory implements Serializable{
private Integer id;
private String title;
private Date startDate;
private Date endDate;
private String description;
private String note;
private String feedback;
private boolean flag;
private Ticket ticketId;
private Event eventId;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="tt_ticket_history_id_seq")
@SequenceGenerator(name = "tt_ticket_history_id_seq", sequenceName = "tt_ticket_history_id_seq", allocationSize = 1)

public Integer getId() {
	return id;
}
public void setId(Integer id) {
	this.id = id;
}
@Column(name="title")
public String getTitle() {
	return title;
}
public void setTitle(String title) {
	this.title = title;
}
@Column(name="start_date")
public Date getStartDate() {
	return startDate;
}
public void setStartDate(Date startDate) {
	this.startDate = startDate;
}
@Column(name="end_date")
public Date getEndDate() {
	return endDate;
}
public void setEndDate(Date endDate) {
	this.endDate = endDate;
}
@Column(name="description")
public String getDescription() {
	return description;
}
public void setDescription(String description) {
	this.description = description;
}
@Column(name="note")
public String getNote() {
	return note;
}
public void setNote(String note) {
	this.note = note;
}
@Column(name="feedback")
public String getFeedback() {
	return feedback;
}
public void setFeedback(String feedback) {
	this.feedback = feedback;
}
@Column(name="flag")
public boolean isFlag() {
	return flag;
}
public void setFlag(boolean flag) {
	this.flag = flag;
}
@ManyToOne
@JoinColumn(name="ticket_id")
public Ticket getTicketId() {
	return ticketId;
}
public void setTicketId(Ticket ticketId) {
	this.ticketId = ticketId;
}
@ManyToOne
@JoinColumn(name="event_id")
public Event getEventId() {
	return eventId;
}
public void setEventId(Event eventId) {
	this.eventId = eventId;
}


}
